package business.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Required;
import org.springframework.transaction.annotation.Transactional;

import vo.SentenceType;
import business.SentenceTypeService;
import dao.SentenceTypeDAO;

public class SentenceTypeServiceImpl implements SentenceTypeService {

	private SentenceTypeDAO sentenceTypeDao;

	public List<SentenceType> getAll() {
		return sentenceTypeDao.findAll();
	}

	@Required
	public void setSentenceTypeDao(SentenceTypeDAO sentenceTypeDao) {
		this.sentenceTypeDao = sentenceTypeDao;
	}

	@Transactional
	public void insert(SentenceType sentenceType) {
		sentenceTypeDao.create(sentenceType);
	}

	@Transactional
	public SentenceType getById(long sentenceTypeId) {
		return sentenceTypeDao.read(sentenceTypeId);
	}
}